Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move module resolution before config #8448

Merged

Conversation

kkirby
Copy link
Contributor

@kkirby kkirby commented Sep 6, 2022

↪️ Pull Request

Parcel shouldn't ignore the existing tsconfig's module resolution. This PR moves the moduleResolution property up before the expansion of config. That way if the user provides a moduleResolution in their .tsconfig, Parcel doesn't override it.

💻 Examples

The issue occurs when using NodeNext as a module resolution. Since Parcel overrides the module resolution, packages that use package.json:exports are no longer resolvable by TypeScript.

🚨 Test instructions

Import a package that uses exports in the package.json file, then make Parcel export types. Warnings will be thrown from TypeScript about missing modules. If your .tsconfig has NodeNext as the moduleResolution, then Parcel shouldn't override it. With it not overridden, the warnings do not occur.

Notes

I'm using my package @kkirbatski/parcel-resolver-require-resolve to make Parcel compatible with exports in package.json.

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@devongovett devongovett merged commit 041d633 into parcel-bundler:v2 Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants